import { gql } from '@apollo/client';

// 查询
export const GET_TEACHERS = gql`
query getTeachers($page:PageInput!,$name: String) {
  getTeachers(page:$page,name: $name){
    code
    message
    data {
      id
      name
      photoUrl
      teacherTime
      education
      seniority
      experience
      carryPrize
      tags   
    }
    page {
      pageNum
      pageSize
      total
    }
  }
}
`;
// 详情
export const GET_TEACHER = gql`
query getTeacherInfo($id:String!) {
  getTeacherInfo(id:$id){
    code
    message
    data {
      id
      name
      photoUrl
      teacherTime
      education
      seniority
      experience
      carryPrize
      tags
    }
  }
}
`;
// 删除
export const DELETE_TEACHER = gql`
    mutation deleteTeacher($id:String!) {
        deleteTeacher(id:$id){
            code,
            message,
        }
    }
`;

// 增/改
export const COMMIT_TEACHER = gql`
  mutation commitTeacherInfo($params: TeacherInput!,$id:String) {
    commitTeacherInfo(params: $params,id: $id){
      code,
      message
    }
  }
`;
